package com.delivery.service;

import com.delivery.dto.OrderPaymentDTO;
import com.delivery.dto.PlaceOrderDTO;
import com.delivery.vo.OrderPaymentVO;
import com.delivery.vo.PlaceOrderVO;
import org.springframework.stereotype.Service;

@Service
public interface OrderService {

    /**
     * 用户下单
     * @param dto
     * @return
     */
    PlaceOrderVO placeOrder(PlaceOrderDTO dto);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrderPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);
}
